﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using octopus_project.enumeration;
using octopus_project.scene.cannon.weapon;

namespace octopus_project.tileset.mapCells {
    class Wall_MapCell : MapCell {

        public Wall_MapCell() {
            tileType = TileType.PLAYER_WALL;
            StrongCell = new StrongCell(1);
        }

        public override MapCell shootMe(Damage damage) {

            if (StrongCell.damage(damage.Value)) {

                return change(TileType.NOT_CONQUERED);
            }

            return this;
        }

        public override MapCell build() {
            MapCell mapCell = new StrongWall_MapCell();
            mapCell.setValues(this);
            return mapCell;
        }

        public override bool isWall() {
            return true;
        }

        public override bool isEnabledToBuild() {
            return true;
        }
    }
}
